package com.lxsh.cer;


import com.hhlt.common.components.message.utils.MessageUtils;
import com.hhlt.common.constants.CommonConstants;
import com.hhlt.core.cache.interfaces.ICacheService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;

/**
 * 系统启动加载系统配置相关文件
 */
@Configuration
@Order(1)//如果多个自定义ApplicationRunner，用来标明执行顺序
public class CerRunImp implements ApplicationRunner {

    @Autowired
    private ICacheService cacheService;

    @Value("${system.primary.key.policy}")
    private String primaryKeyPolicy;

//    @Autowired
//    private String testString1;
//
//    private String testString2;

//    /**
//     * 定时任务 Service
//     */
//    @Autowired
//    private ISystemSchedulerService<SystemSchedulerVO, SystemScheduler, SystemSchedulerQO> systemSchedulerService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        CommonConstants.PRIMARY_KEY_POLICY = primaryKeyPolicy;

        MessageUtils.setProjectMessage("cer");

//        // 任务调度启动
//        systemSchedulerService.doStartSystemScheduler("zh_CN");
    }
}
